package test.heliotrope.res
{
	import flash.display.Stage;
	import flash.events.Event;
	
	import flexunit.framework.Assert;
	
	import heliotrope.config.ConfigPool;
	import heliotrope.display.AutoBitmap;
	import heliotrope.global.GlobalVar;
	import heliotrope.net.loader.LoadState;
	import heliotrope.game.system.LoadSystem;
	import heliotrope.res.BitmapAttacher;
	import heliotrope.res.BitmapdataDistributor;
	import heliotrope.res.ResourceAttacher;
	import heliotrope.res.TileResource;
	import heliotrope.res.manager.GraphicLoadManager;
	
	import org.flexunit.async.Async;
	
	public class TileResourceTest
	{	
		private static var __testObj:TileResource;
		[Before]
		public function setUp():void
		{
		}
		
		[After]
		public function tearDown():void
		{
		}
		
		[BeforeClass]
		public static function setUpBeforeClass():void
		{
			ConfigPool.init();
			LoadSystem.init();
			GraphicLoadManager.init();
			__testObj = new TileResource(9,99,99);
		}
		
		[AfterClass]
		public static function tearDownAfterClass():void
		{
		}
		
		[Test(async)]
		public function testGetTile():void
		{
//			var attacher:BitmapAttacher = new BitmapAttacher;
//			attacher.addEventListener(ResourceAttacher.RECIEVE, Async.asyncHandler(this, recieveHandler, 1000, attacher));
//			var tile:MapTile = __testObj.getTile(0,0);
//			tile.attach(attacher);
//			Assert.assertFalse(__testObj.getTile(0,0).loadState == LoadState.NOT_LOAD);
		}
		
		protected function recieveHandler(event_:Event, passThroughData_:Object):void
		{
//			Assert.assertNotNull((passThroughData_ as BitmapAttacher).bitmapData);
		}
	}
}